<template>
  <div class="warp" @click="fn">
    <div class="img">
      <img :src="src" />
      <div class="text">
        <p>{{ time }}</p>
        <h1>{{ title }}</h1>
      </div>
    </div>
  </div>
</template>


<script setup>
const props = defineProps({
  src: String,
  title: String,
  time: String,
  url: String,
});

const fn = () => {
  console.log(props);
  window.open(props.url, "_blank");
};
</script>

<style scoped>
.warp {
  cursor: pointer;
  height: auto;
}
.img {
  height: 100%;
  width: 100%;
}
.img img {
  width: 100%;
  height: 100%;
}
.img .text {
  position: relative;
  left: -17%;
  top: -40px;
  font-size: 10px;
  bottom: 70px;
  color: rgb(252, 252, 252);
}
h1 {
  color: rgb(255, 255, 255);
}
</style>